home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 4.2 / arexx / editor / oz / 98-fixjitter < prev    next >
Text File  |  1998-04-16  |  2KB  |  89 lines

  1. /* KillBad.rexx V1.3 -- adds 1 frame to odd length stills & frames  */
  2. /*    >>>  by Aussie -- 1995 M.Holten <<<      
  3.  
  4. To use, simply run the routine, it searches the entire project
  5.  
  6. */
  7.  
  8. call remlib('PROJECT_REXX_PORT')
  9. call addlib('PROJECT_REXX_PORT',0)
  10.  
  11.  
  12. test=req_tell("Kill-Bad - by Aussie (pre 4.1)","  Kills jitters by finding odd length","   Stills & Frames, & adds 1 frame.")
  13. if test~=1 then call quit()
  14.  
  15. /* --- begin --- */
  16. start_loc=croutonspot()
  17. project_end=croutonsinproject()
  18.  
  19.  
  20.  
  21. call sequence()
  22. call quit1()
  23.  
  24.  
  25.  
  26. sequence:
  27.  
  28.  
  29.  
  30. current_spot=-1
  31. foundend=0
  32. founderr1=0
  33.  
  34. do while foundend~=1
  35.    cur_start=0
  36.    cur_duration=0
  37.    current_spot=current_spot+1
  38.    if current_spot>project_end then do
  39.       call time('R')
  40.       do while (time('E')<0.5)
  41.         end
  42.       call req_tell("All done. " founderr1 "odd/even errors","        Reached end of project")
  43.       call croutonpick(start_loc)
  44.       call req_error(" OZ:   All done.    <<< Kill those little jitters >>")
  45.       call quit1
  46.       end
  47.  
  48. /* --- Read clip --- */
  49.    call croutonpick(current_spot)
  50.    type=croutontype()
  51.  
  52. /* --- test for clip --- */
  53.    if (type="STIL") | (type="FRAM") | (type="MAIN") then do
  54.       found=1
  55.       Cur_Duration=croutongettag(Duration)
  56.       if (cur_duration//4 ~= 0) then do
  57.          founderr1=founderr1+1
  58.          cur_duration=cur_duration+2
  59.          test=croutonsettag(duration,cur_duration)
  60.          end
  61.       if (cur_duration//4 ~= 0) then do
  62. call time('R')
  63. while (time('E')<0.5)
  64.  
  65.          call req_tell("Problem.  Suggest you change duration","of this to an even number!", "Then run this ARexx from here again")
  66.          call quit1
  67.          end
  68.       end
  69.    if type="CLIP" then do
  70.       Cur_Duration=croutongettag(Duration)
  71.       Vprev_duration=cur_duration
  72.       Vprevtype=type
  73.       Vprevstart=croutongettag(clipstartfield) /* used if next audio locked to clip, not inpoint */
  74.       end
  75.    end
  76. return
  77.  
  78.  
  79.  
  80. /* ************************************** */
  81.  
  82.  
  83. quit:
  84. call req_error(" OZ:    <<< Last Operation Canceled >>>")
  85.  
  86. quit1:
  87. call remlib("PROJECT_REXX_PORT")
  88. exit
  89.